package d6_pool;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class t3 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        Callable<String> call = new MyCallable(100);
        FutureTask<String> f1 = new FutureTask<>(call);
        new Thread(f1).start();
        String rs = f1.get();
        System.out.println(rs);
    }
}
